﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EF通用方法
{
    public class BaseContext : DbContext
    {
        public BaseContext() : base("Conn") { }
        public BaseContext(string s) : base(s) { }

        public DbSet<Person> Person { get; set; }


        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
